<template>
  <Suspense @pending="pendingEvent" @resolve="resolveEvent" @fallback="fallbackEvent">
    <AsyncComp></AsyncComp>
    <template #fallback>
      load....
    </template>
  </Suspense>
</template>
<script setup>
import { defineAsyncComponent } from 'vue';

const AsyncComp = defineAsyncComponent(()=>{
  return import('./components/ChildOne.vue')
})
// const AsyncComp = defineAsyncComponent({
//   loader:()=>import('./components/ChildOne.vue'),
// })

const pendingEvent = ()=>{
  console.log('pendingEvent....');
}
const resolveEvent = ()=>{
  console.log('resolveEvent....');
}
const fallbackEvent = ()=>{
  console.log('fallbackEvent....');
}
</script>